<?php
/**
 * Created by PhpStorm.
 * User: 谢
 * Date: 2017/2/22
 * Time: 17:07
 */

namespace app_supplier\assets;

use yii\web\AssetBundle;
use yii\web\View;

class LoginAssets extends AssetBundle
{
    public $basePath = "@webroot";#物理路劲
    public $baseUrl = "@web";#url根路径

    public $css = [
        'css/basemod.css',
        'css/button.css',
        'css/form.css',
        'css/invoice.css',
        'css/jquery.webui-popover.min.css',
        'css/stylesheet.css',
        'styles/global.css',
    ];
    public $js = [
        'js/jquery-1.7.1.min.js',
        'js/SuperSlide.2.1.js',
    ];
    public $jsOptions = [
        'position' =>View::POS_HEAD
    ];

    /**添加css文件
     * @param $view
     * @param $cssFile
     */
    public function addCss($view, $cssFile)
    {
        $view->registerCssFile($cssFile, [
            LoginAssets::className(),
            'depends'=>'app_supplier\assets\LoginAssets'
        ]);
    }

    /**添加js文件
     * @param $view
     * @param $jsFile
     */
    public function addScript($view, $jsFile)
    {
        $view->registerJsFile($jsFile, [
            LoginAssets::className(),
            'depends'=>'app_supplier\assets\LoginAssets'
        ]);
    }
}